import React, { PureComponent } from "react"
import Styles from '@/scss/froms.scss'

import ComDropDown from '@/pages/components/rights/from/from_nav/from_dropdown'
import { CloseOutlined } from '@ant-design/icons';
//表单修改表单导航栏
class UpdateNav extends PureComponent<Iprops, any>{
  render() {

    return (
      <div className={Styles.nav}>
        <div className={Styles.from_drop} style={{cursor:"pointer"}}>
          <ComDropDown getCollectByID={this.props.getCollectByID} changeVisible={this.props.changeVisible} todo={this.props.todo} handleMoveRecyle={this.props.handleMoveRecyle} handleCollect={this.props.handleCollect} />
        </div>
        <div className={Styles.nav_out} onClick={() => this.props.changeVisible()}><CloseOutlined style={{ fontSize: "1.3rem" }} /> </div>
      </div>
    )
  }
}
//传入的函数
type Iprops = {
  todo: any,
  hadleSubmit: () => void,
  changeVisible: () => void,
  handleMoveRecyle: (id: string, state: string) => void
  handleCollect: (id: string, state: string) => void
  getCollectByID: (id: string) => boolean
}

export default UpdateNav